package com.lagou.core;

import com.lagou.core.context.MyServletWebServerApplicationContext;

public class MySpringApplication {

    public static void run(Class<?> primarySource) {
        MyServletWebServerApplicationContext context = new MyServletWebServerApplicationContext();

        // 注册启动类
        context.register(primarySource);

        // 触发IoC容器核心刷新方法
        context.refresh();
    }

}
